module.exports = app => {
    const { STRING, INTEGER, DATE } = app.Sequelize;
  
    const User = app.model.define('users', {
        username: STRING
    });
  
    User.find = async function(id) {
        const user = await this.findOne({
            where: {
                id: id
            }
        })
        return user || {}
    }
    
  
    return User
  };